#include<iostream>
#include<sstream>
#include<string.h>
#include<limits>
using std::endl;
using std::cout;
using std::string;
using std::cin;

bool checkNum(std::istream& iss,string& line)
{
    char * arr = new char[line.size()+1]();
    iss.getline(arr,line.size()+1,'\n');
    if(strlen(arr)!=0)
    {
        delete []arr;
        return false;
    }
        delete []arr;
    return true;

    
}

int main()
{
    int num;
    string line;
    while(std::getline(cin,line),!cin.eof())
    {
        if(cin.bad()) cout<<"badbit"<<endl;
        else if(cin.fail())
        {
            cin.clear();
            cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n');
            cout<<"11需要重新输入"<<endl;
            line.clear();
        }
        else 
        {
            std::istringstream iss(line);
            iss>>num;
            if(iss.fail())
            {
                cout<<"请重新输入"<<endl;
                continue;
            }
            if(checkNum(iss,line))
            {
                cout<<"输入的数字为"<<line<<endl;
                break;
            }
            line.clear();
            cout<<"22需要重新输入"<<endl;
        }
    }
}
